package org.itboys.core.entity.mysql.wallet.record;

import lombok.Data;
import org.itboys.core.common.WalletRecordEnum;
import org.itboys.mysql.entity.BaseMySqlEntity;

import java.math.BigDecimal;

/**
 * @Author：贾琦磊
 * @Date：2018/11/27
 * @Description：钱包记录,充值记录，提现记录
 */
@Data
public class SundayWalletRecord extends BaseMySqlEntity {
    private Long memberId;//用户id
    private Long walletId;//钱包主表id
    private BigDecimal money;//获得或者扣减的金额
    private Integer operation;//运算方式
    private Integer type;//记录类型
    private String remark;//备注:充值，提现存账户，收益填写订单号
    private Integer status;//0未生效，1已生效,2驳回
    private String vouch;//转账证明
    /**
     * 以下信息用于web端展示,不作为数据库实际存储
     */
    private String memberName;//用户名称，不存储，用于web端展示
    private String mobile;//用户手机号


    public String getTypeStr() {
        return WalletRecordEnum.getDesc(type);
    }

    public SundayWalletRecord() {
    }

    public SundayWalletRecord(Long memberId, Long walletId, BigDecimal money, Integer operation,
                              Integer type, String remark, Integer status) {
        this.memberId = memberId;
        this.walletId = walletId;
        this.money = money;
        this.operation = operation;
        this.type = type;
        this.remark = remark;
        this.status = status;
    }
}
